home *** CD-ROM | disk | FTP | other *** search
Wrap
'********************************************** '* Data structure for Function 99. This is to '* hold row and column positions. '********************************************** Type RowColPosition x As Integer Y As Integer End Type '********************************************** '* Data structure for Function 10. This will '* be used by the array SessionArray. '********************************************** Type SessionInfo ShortName As String * 1 LongName As String * 8 State As String * 1 PSSize As Integer End Type Global SessionArray(25) As SessionInfo '************************************************ '* Data Structure for Function 16. '************************************************ Type EmulatorControl ShortName As String * 1 Visibility As String * 1 Reserved As String * 1 Case As String * 1 Left As Integer Bottom As Integer Right As Integer Top As Integer End Type '************************************************ '* Data Structure for Flight Avalability '************************************************ Type FAType Pad1 As String * 1 Number As String * 2 Pad2 As String * 2 Origin As String * 3 Pad3 As String * 1 Terminus As String * 3 Pad4 As String * 3 LeaveDate As String * 1 Pad5 As String * 1 LeaveTime As String * 4 Pad6 As String * 2 ArriveDate As String * 1 Pad7 As String * 1 ArriveTime As String * 4 Pad8 As String * 1 Airline As String * 2 Pad9 As String * 2 FlightNumber As String * 3 Pad10 As String * 1 Aircraft As String * 3 Pad11 As String * 1 Stops As String * 1 Pad12 As String * 4 Code1 As String * 18 End Type Global FlightInfo(1 To 100) As FAType Declare Function ATMGetFlightInfo Lib "ATMAPI.DLL" Alias "ATMGetString" (ByVal hwnd%, ByVal Row%, ByVal Column%, FlightInfoString As Any, ByVal Length%) As Integer Type ExtraCodesType Pad1 As String * 49 Code1 As String * 9 End Type Global ExtraCodes(1 To 100) As ExtraCodesType '************************************************* '* Declare a global variable to contain the '* window handle information for the current form. '* This will require some programming by the user. '************************************************* Global hCom As Integer Global PSID$ ' BackColor, ForeColor, FillColor (standard RGB colors: form, controls) Global Const BLACK = &H0& Global Const RED = &HFF& Global Const GREEN = &HFF00& Global Const YELLOW = &HFFFF& Global Const BLUE = &HFF0000 Global Const MAGENTA = &HFF00FF Global Const CYAN = &HFFFF00 Global Const WHITE = &HFFFFFF Global Path$ Global FileName$ Global LoadFile$ Global NewName$ Global Length% Global PauseTime% Global pndrow% Global pndcol% Global inactrow% Global inactcol% Global nccflog$ Global statlog$ Global nccfkey$ Global HostSession$ Global Retry$ Global Title$ Global NetVID$ Global StatMainID$ Global StatDetailID$ Global NccfID$ Global AvailCom As String Global CurrentDay As String Global fLoggedOn As Integer Global NumbFlights As Integer Global PU() As String Global SideA() As String Global SideB() As String Global Pending() As String Global Inactive() As String Sub CenterForm (FormToCenter As Form) FormToCenter.Left = (Screen.Width - FormToCenter.Width) / 2 FormToCenter.Top = (Screen.Height - FormToCenter.Height) / 2 End Sub Sub GetFlightAvailability (AvailCom As String) Dim sHold As FAType Dim sxHold As ExtraCodesType Dim MoreIndicator As String Dim fGotExtraCodes As Integer Dim fAnotherPage As Integer If Not fLoggedOn Then 'DoLoggonProcess End If NumbFlights = 0 fAnotherPage = True fGotExtraCodes = True retc% = ATMSendKey(hCom, AvailCom + "@E") retc% = ATMWaitHostQuiet(hCom, 250, 4) Do While fAnotherPage For i% = 2 To 19 x% = ATMGetFlightInfo(hCom, i%, 1, sHold, Len(sHold)) If Val(sHold.Number) > 0 Then If sHold.Airline = "SA" Then NumbFlights = NumbFlights + 1 fGotExtraCodes = False FlightInfo(NumbFlights) = sHold Debug.Print NumbFlights, FlightInfo(NumbFlights).FlightNumber End If Else If Not fGotExtraCodes Then x% = ATMGetFlightInfo(hCom, i%, 1, ExtraCodes(NumbFlights), Len(sxHold)) fGotExtraCodes = True Debug.Print " ExtraCodes", NumbFlights, ExtraCodes(NumbFlights).Code1 End If End If Next i% x% = ATMGetString(hCom, 21, 2, MoreIndicator, 5) If UCase$(Left(MoreIndicator, 1)) = "M" Then fAnotherPage = True retc% = ATMSetCursorLocation(hCom, 22, 2) retc% = ATMSendKey(hCom, "md@E") retc% = ATMWaitHostQuiet(hCom, 250, 4) Else fAnotherPage = False End If Loop retc% = ATMSetCursorLocation(hCom, 22, 2) retc% = ATMSendKey(hCom, "mu@E") retc% = ATMWaitHostQuiet(hCom, 250, 4) End Sub Function TranslateAircraft (AircraftCode As String) As String Select Case AircraftCode Case "AB3" TranslateAircraft = "Airbus 300" Case "320" TranslateAircraft = "Airbus 320" Case "73S" TranslateAircraft = "Boeing 737" Case "F28" TranslateAircraft = "Fokker 28" Case Else TranslateAircraft = "Unknown" End Select End Function